class Manage::SettingsController < Manage::MainController
  
  # GET /manage/settings
  def index
    respond_to do |format|
      format.html # render index.html
      format.xml{ render :xml => Settings.all }
    end
  end
  
  # POST /manage/settings
  # POST /manage/settings.xml
  def create
		save_settings(params[:settings])
		
		respond_to do |format|
      flash[:notice] = I18n.t('flash.settings.updated')
      format.html { redirect_to manage_settings_path }
      format.xml { head :ok }
    end
	end
	
	private
	
  def save_settings(options)
    Settings.email_from = options[:email_from]
	  Settings.contact_email = options[:contact_email]
  end
end
